#ifndef XGE_XUNITTEST_XFILE_GENERAL_OP_H_
#define XGE_XUNITTEST_XFILE_GENERAL_OP_H_
#include "xge_common_config.h"
#include "xunit_test.h"
#include "xfile_general_operation.h"
#include "xassert.h"
#include <stdio.h>

using xge::FileSearch;

UNIT_TEST(XFILEOP,Case1) {

  FileSearch search( _xT("D:\\*.*") );
  while( search.HasNext() ) {
    if( search.is_file())
      wprintf( _xT("File:%s.\n") , search.file_name() );
    else 
      wprintf( _xT("Dic:%s.\n") , search.file_name() );

    search.Next();
  }

  search.Research( _xT("C:\\*"));
  while( search.HasNext() ) {
    if( search.is_file())
      wprintf( _xT("File:%s.\n") , search.file_name() );
    else 
      wprintf( _xT("Dic:%s.\n") , search.file_name() );
    search.Next();
  }

  XASSERT( xge::CreateFolder(_xT("C:\\MyFolder")) );

  ::getchar();
}


#endif// XGE_XUNITTEST_XFILE_GENERAL_OP_H_